<template>
  <a-button
    class="app-toggle-button"
    :type="this.status === 'off' ? 'default' : 'primary'"
    @click.stop="onClickButton"
  >
    <template v-if="this[status + 'Icon']">
      <a-icon v-if="useIcon" :type="this[status + 'Icon']"></a-icon>
      <i v-else class="toggle-button-icon" :class="this[status + 'Icon']"></i>
    </template>
    <span class="toggle-button-text">
      {{ this[status + "Label"] }}
    </span>
  </a-button>
</template>

<script lang='ts' src='./index.ts'></script>
<style lang='scss' scoped>
@import "./_index.scss";
</style>
